export interface RequestConfig {
  url: string;
  timeout?: number;
  headers?: any;
  data?: string | AnyObject | ArrayBuffer;
  method?:
    | "OPTIONS"
    | "GET"
    | "HEAD"
    | "POST"
    | "PUT"
    | "DELETE"
    | "TRACE"
    | "CONNECT";
}

export interface RequestSuccessCallbackResult {
  /**
   * 开发者服务器返回的数据
   */
  data: string | AnyObject | ArrayBuffer;
  /**
   * 开发者服务器返回的 HTTP 状态码
   */
  statusCode: number;
  /**
   * 开发者服务器返回的 HTTP Response Header
   */
  header: any;
  /**
   * 开发者服务器返回的 cookies，格式为字符串数组
   */
  cookies: string[];
}

export interface HttpResponse {
  code: number;
  message?: string;
}
